package cn.ljy.mes.model;

import cn.ljy.authority.model.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;

@ApiModel(value = "汽车生产工单审核日志类")
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false, of = {"id"})
public class MesProductionOrderAuditLog{

    @ApiModelProperty(value = "生产工单审核日志ID", example = "01f15383-7cb4-11f0-92a2-0250f2000002")
    private String id;

    @ApiModelProperty(value = "生产工单订单关联对象", required = true)
    private MesProductionOrder productionOrder;

    @ApiModelProperty(value = "生产工单ID",notes = "仅用于数据库检索（虽然有关联字段productionOrder，但是关联字段需要连表查询，故针对检索频率高的字段加上这个），不作为查询条件、插入、更新、删除的依据字段")
    private String orderId;

    @ApiModelProperty(value = "审核员")
    private SysUser auditor;

    @ApiModelProperty(value = "整车检查结果是否通过", example = "true")
    private Boolean auditResult;

    @ApiModelProperty(value = "审核意见", example = "质量有问题")
    private String auditNote;

    @ApiModelProperty(value = "创建时间", example = "2025-08-19 12:29:32")
    private Date createTime;

    //非数据库字段
    @ApiModelProperty(value = "品牌名",notes = "用于显示查询结果字段")
    private String brandName;
    @ApiModelProperty(value = "车型名",notes = "用于显示查询结果字段")
    private String modelName;
    @ApiModelProperty(value = "配置名",notes = "用于显示查询结果字段")
    private String modelConfigName;
    @ApiModelProperty(value = "订单号",notes = "用于显示查询结果字段")
    private String orderNo;
    @ApiModelProperty(value = "车辆VIN",notes = "用于显示查询结果字段")
    private String vin;

    public MesProductionOrderAuditLog(String id) {
        this.id = id;
    }
}